#{extends 'main.html' /}
#{set title:'Home' /}

#{if user}
    <div class="post">
        <h2 class="post-title">
            <a href="#">${user.email}</a>
        </h2>
        <div class="post-metadata">
            <span class="post-author">by ${user.email}</span>
            
        </div>
        
    </div>
    
    #{if otherUser.size() > 1}
        <div class="older-posts">    
            <h3>Older posts <span class="from">from this blog</span></h3>
        
            #{list items:otherUser, as:'oldPost'}
                <div class="post">
                    <h2 class="post-title">
                        <a href="#">${oldPost.email}</a>
                    </h2>
                    
                </div>
            #{/list}
        </div>
        
    #{/if}
    
#{/if}
 
#{else}
    <div class="empty">
        There is currently nothing to read here.
    </div>
#{/else}